// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.

import 'dart:developer';
import 'dart:io';

import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:myapp/common/dio_api_common.dart';
import 'package:myapp/common/store.dart';

import 'file:///D:/Users/Administrator/AndroidStudioProjects/myapp/lib/test_page/main_test_page.dart';

void main() {
  testWidgets('Counter increments smoke test', (WidgetTester tester) async {
    // Build our app and trigger a frame.
    await tester.pumpWidget(MyAppTestPage());
    await dataStore.setAuthorizationToken("tokenStr");
    dataStore.getAuthorizationToken().then((value) => print(value)).catchError((onError) => print(onError));
  });

  test("get dir of document", () async {
    await dataStore.setValue("key", "value");
    await dataStore.setAuthorizationToken("tokenStr");
    var val = await dataStore.getAuthorizationToken();
    print(val);
  });

  test("description", () {
//    myAppApiCommon.getTest().then((value) => print(value)).catchError((e) => print(e));
    Dio().get("https://lizo.top2").then((value) {
      print(value);
    }).catchError((onError) {
      print(onError);
    });
    print("here");
  });
}
